<?php echo $this->Form->create('Users'); ?>
<div class="widget">
    <div class="whead"><h6>LISTADO DE CLIENTES</h6><div class="clear"></div></div>
    <div class="shownpars">
        <table cellpadding="0" cellspacing="0" border="0" class="dTable">
            <thead>
                <tr>
                    <th>Nro.</th>
                    <th>Nombre</th>
                    <th>Usuario</th>
                    <th>Correo Electronico</th>
                    <th>Carnet de Identidad</th>
                    <th>Acciones</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                <?php $i = 1;?>
                <?php foreach ($users as $usu): ?>
                <?php $estado = ($usu['User']['estado'] == 1) ? "habilitado" : "deshabilitado"; ?>
                <?php $clasestado = ($usu['User']['estado'] == 1)? "class=tag" : "class=high";?>
                
                <td><?php echo $i; $i++; ?></td>
                <td><?php echo $usu['User']['nombre']; ?></td>
                <td><?php echo $usu['User']['username']; ?></td>
                <td><?php echo $usu['User']['correo']; ?></td>
                <td><?php echo $usu['User']['ci']; ?></td>
                <td>
                    <?php echo $this->Html->link($this->Html->image("iconos/edit.png", array("alt" =>'Editar', 'title' => 'Editar')), array('action' => 'edit', $usu['User']['id']),array('escape' => false)); ?>
                    <?php echo $this->Html->link($this->Html->image("iconos/pass.png", array("alt" =>'Cambio Password', 'title' => 'Cambio Password')), array('action' => 'cambiopass', $usu['User']['id']),array('escape' => false)); ?>                 
                    
                
                     <?php //echo $this->Html->link('EDITAR',array('action' => 'edit', $usu['User']['id']), array('class' => 'inner_a')); ?>
                     <?php //echo $this->Html->link('CAMBIO DE PASSWORD',array('action' => 'cambiopass', $usu['User']['id'])); ?>
                     <?php //echo $this->Html->link('ELIMINAR',array('action'=>'eliminar',$usu['User']['id']),array('class' => 'inner_a'),('Desea realmente eliminar?')); ?>                        
                     
                     <?php if($estado == "habilitado"):?>
                        <?php echo $this->Html->link($this->Html->image("iconos/alta.png", array("alt" =>'Dar Baja', 'title' => 'Dar Baja')), array('action' => 'baja', $usu['User']['id']),array('escape' => false)); ?>
                        <?php //echo $this->Html->link('DAR DE ALTA', array("alt" => 'dar baja', 'title' => 'dar de baja'), array('action' => 'baja', $usu['User']['id'])); ?>&nbsp;
                        <?php else:?>
                        <?php echo $this->Html->link($this->Html->image("iconos/baja.png", array("alt" =>'Dar Alta', 'title' => 'Dar Alta')), array('action' => 'alta', $usu['User']['id']),array('escape' => false)); ?>
                        <?php //echo $this->Html->link('DAR DE BAJA', array("alt" => 'dar alta', 'title' => 'dar de alta'), array('action' => 'alta', $usu['User']['id'])); ?>&nbsp;
                     <?php endif;?>
                </td>
                </tr>
            <?php endforeach; ?>                
            </tbody>
        </table>
    </div> 
</div>          
                    
  